//    Copyright (C) Kherty.  All rights reserved.
using System.Collections.Generic;
using OpenLS.Core.Serialization;

namespace OpenLS.Vml
{
    internal delegate TResult Func<TResult>();

    class ReadHelper
    {
        public static IEnumerable<T> ReadMany<T> (Func<T> fn)where T: class,IOfficeXmlSerializable
        {
            T t = fn();
            while (t != null)
            {
                yield return t;
                t = fn();
            }
        }
    }
}